<template>
  <div class="root">
    <div class="title">
      <h1>Vue Router Demo</h1>
    </div>
    <div class="body">
      <div class="nav">
        <router-link class="link" to="/about" active-class="active">About</router-link>
        <router-link class="link" to="/home" active-class="active">Home</router-link>
      </div>
      <div class="content">
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>

<script>

export default {
  name: 'App',
}
</script>

<style>
.root {
  margin: 50px auto;
  width: 700px;
}
.title {
  border-bottom: 1px solid #ccc;
}
.nav,
.content {
  display: inline-block;
}
.nav {
  margin-right: 20px;
}
.link {
  display: block;
  text-decoration: none;
  height: 40px;
  width: 100px;
  background-color: #f3f5f4;
  color: #000000;
  text-align: center;
  line-height: 40px;
}
.active {
  background-color: #327ab6;
}
.body {
  margin-top: 20px;
}
</style>